﻿//
// Created by francklinson on 2021/3/14.
//

#include <iostream>
#include <cstring> // prototype for strcmp()

int main()
{
    using namespace std;
    char word[5] = "?ate";
    for (char ch = 'a'; strcmp(word, "mate") != 0; ch++) //strcmp比较两个字符串 相等返回0
    {
        cout << word << endl;
        word[0] = ch;
    }
    cout << "After loop ends, word is " << word << endl;
    return 0;
}